package src.main.java.org.exception;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ExceptionTest1 {
    public static void main(String[] args) {
        try {
            test1();
        } catch (FileNotFoundException e) {
            System.out.println("您要找的文件不存在");
            throw new RuntimeException(e);
        } catch (ParseException e) {
            System.out.println("您要解析的时间有问题");
            throw new RuntimeException(e);
        }
    }
    public static void test1() throws FileNotFoundException, ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date parse = sdf.parse("2028-11-11 10:24");
        System.out.println(parse);

        test3();


    }
    public static void test3() throws FileNotFoundException {
        InputStream is = new FileInputStream("D:/1.png");
    }
}
